package com.cssl.controller;


import com.cssl.domain.DtsTopic;
import com.cssl.service.DtsTopicService;
import com.cssl.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
@RequestMapping("/topic")
@RestController
@Api(value = "专题接口",tags = "专题相关操作")
public class DtsTopicController {

    @Autowired
    private DtsTopicService service;
    @PostMapping("/getTopicById")
    @ApiOperation(value = "根据id查询topic",notes = "接收id")
    public Result getTopicById(@RequestBody Map map){
        return service.getTopicById(map);
    }

    @PostMapping("/getTopicNotById")
    @ApiOperation(value = "查询除id以外的topic",notes = "接收id")
    public Result getTopicNotById(@RequestBody DtsTopic topic){
        return service.getTopicNotById(topic);
    }
}